import { defineConfig } from 'vitepress'
import AutoSidebar from 'vite-plugin-vitepress-auto-sidebar'; // 自动生成侧边栏
export default defineConfig({
  lastUpdated: true, // 最后更新时间
  vite: {
    plugins: [
      AutoSidebar({
        // 自动侧边栏配置
        collapsed: true,
      })
    ]
  },
  head: [
    [
      'link', // 设置 favicon.ico，注意图片放在 public 文件夹下
      {
        rel: 'icon',
        href: 'logo.png'
      }
    ]
  ],
  markdown: {
    lineNumbers: true, //为所有代码启动行号
    theme: {
      light: "vitesse-light",
      dark: "vitesse-dark",
    },
  },
  title: "liang14658fox",
  description: "hello Docs!",
  themeConfig: {
    // siteTitle: "liang14658fox",
    logo: "/logo.png",
    nav: [
      {
        text: "🏷️ 个人作品",
        link: "/intent/index"
      },{
        text: "👾 AI小助手",
        link: "/intent/dify_chagGPT4o_mini"
      },
      {
        text: '专题',
        items: [
          {
            text: '⚡ 效率',
            items: [{
              text: "环境配置&库的引入",
              link: "专题、其他/版本控制工具/Git/122.常用git命令.md"
            }, {
              text: "常见需求",
              link: "专题、其他/前端常见需求及其思路/查询.md"
            }, {
              text: "代码托管平台",
              link: "专题、其他/代码托管平台/GitHub/将本地项目同步到GitHub仓库.md"
            }, {
              text: "版本控制工具",
              link: "专题、其他/版本控制工具/Git/122.常用git命令.md"
            }, {
              text: "🧰 开发规范&开发工具",
              link: "专题、其他/开发规范与开发工具/035.Vue开发命名规范.md"
            },
            ]
          },
          {
            text:'分类',
            items:[
              {
                text: "设计模式",
                link: "专题、其他/设计模式/test.md"
              }, {
                text: "前端性能优化",
                link: "专题、其他/前端性能优化/test.md"
              }, {
                text: "🔐 前端安全",
                link: "专题、其他/前端安全/test.md"
              }, {
                text: "💯 前端面试题",
                link: "专题、其他/面试题/浏览器与网络面试题.md"
              },
            ]
          }, 
        ]
      },
      {
        text: '原生与基础',
        items: [
          {
            text: "🛰️ Internet",
            link: "/原生基础/Internet/协议/126.计算机网络协议.md"
          }, {
            text: "HTML",
            link: "/原生基础/HTML/基础/178.HTML代码模板.md"
          }, {
            text: "💈 CSS",
            link: "/原生基础/CSS/基础/096.常用效果.md"
          }, {
            text: "🧠 ECMAScript",
            link: "/原生基础/JavaScript/基础/059.console高级.md"
          }, {
            text: "DOM/BOM",
            link: "/原生基础/WebAPIs/DOM/182.元素节点操作.md"
          }, {
            text: "🔥 ES6+",
            link: "/原生基础/ES6+/086.声明变量6种方法.md"
          }, {
            text: "🧊 JS高级",
            link: "/原生基础/JS高级/074.有向无环图的应用.md"
          },
          // {
          //   text: "JS算法",
          //   link: "/原生基础/JS算法/test.md"
          // }, {
          //   text: "JS底层源码",
          //   link: "/原生基础/JS底层源码/test.md"
          // },
        ]
      }, {
        text: '框架与工程化',
        items: [
          {
            text: "🧃 Vue",
            link: "/框架与工程化/Vue/效率与模板/033.代码模板.md"
          },
          {
            text: "⚛️ React",
            link: "/框架与工程化/React/test.md"
          },
          {
            text: "TypeScript",
            link: "/框架与工程化/TypeScript/test.md"
          },
          {
            text: '🚧 前端工程化',
            items: [
              {
                text: "工程化基础",
                link: "/框架与工程化/前端工程化/工程化基础/命令行的使用.md"
              },
              {
                text: "构建工具",
                link: "/框架与工程化/前端工程化/构建&打包工具/webpack/test.md"
              },
              {
                text: "Node.js基础",
                link: "/框架与工程化/前端工程化/Node.js/150.Npm说明.md"
              },
            ]
          },
        ]
      },

      {
        text: '开发方向分类',
        items: [
          {
            text: '数据可视化',
            items: [
              {
                text: "📊 Echarts",
                link: "https://echarts.apache.org/zh/index.html"
              }, {
                text: "🖥️ 大屏开发",
                link: "/index"
              }, {
                text: "🗺️ 地图开发",
                link: "/index"
              },
            ]
          },
          {
            text: '绘图',
            items: [
              {
                text: "🎨 SVG",
                link: "/其他开发方向/绘图/svg/矩形.md"
              },
              {
                text: "🖼️ Canvas",
                link: "/其他开发方向/绘图/canvas/test.md"
              },
            ]
          },
          {
            text: '3D',
            items: [
              {
                text: "Three.js",
                link: "https://threejs.org/"
              },
            ]
          },
          {
            text: '📱 跨端开发框架',
            items: [
              {
                text: "uni-app",
                link: "https://uniapp.dcloud.io/quickstart"
              },
              {
                text: "Taro",
                link: "https://taro.jd.com/"
              },
              {
                text: "⚛️ React Native",
                link: "https://www.reactnative.cn/"
              }, {
                text: "Flutter",
                link: "https://flutter.cn/"
              },
            ]
          },
          {
            text: '静态站点生成器',
            items: [
              {
                text: "Docusaurus",
                link: "https://docusaurus.io/zh-CN/"
              },
              {
                text: "VitePress",
                link: "https://vitepress.dev/"
              },
              {
                text: "VuePress",
                link: "https://vuepress.vuejs.org/zh/"
              }
            ]
          },
        ]
      },
    ],
    search: {
      provider: 'local'
    },
    socialLinks: [
      {
        icon: "github",
        link: "https://github.com/liang14658fox"
      },
      {
        icon: {
          svg: `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="20" height="20"  viewBox="0 0 512 512" >
      <path fill="currentColor" d="M488.6 104.1c16.7 18.1 24.4 39.7 23.3 65.7v202.4c-.4 26.4-9.2 48.1-26.5 65.1c-17.2 17-39.1 25.9-65.5 26.7H92.02c-26.45-.8-48.21-9.8-65.28-27.2C9.682 419.4.767 396.5 0 368.2V169.8c.767-26 9.682-47.6 26.74-65.7C43.81 87.75 65.57 78.77 92.02 78h29.38L96.05 52.19c-5.75-5.73-8.63-13-8.63-21.79c0-8.8 2.88-16.06 8.63-21.797C101.8 2.868 109.1 0 117.9 0s16.1 2.868 21.9 8.603L213.1 78h88l74.5-69.397C381.7 2.868 389.2 0 398 0c8.8 0 16.1 2.868 21.9 8.603c5.7 5.737 8.6 12.997 8.6 21.797c0 8.79-2.9 16.06-8.6 21.79L394.6 78h29.3c26.4.77 48 9.75 64.7 26.1zm-38.8 69.7c-.4-9.6-3.7-17.4-10.7-23.5c-5.2-6.1-14-9.4-22.7-9.8H96.05c-9.59.4-17.45 3.7-23.58 9.8c-6.14 6.1-9.4 13.9-9.78 23.5v194.4c0 9.2 3.26 17 9.78 23.5s14.38 9.8 23.58 9.8H416.4c9.2 0 17-3.3 23.3-9.8c6.3-6.5 9.7-14.3 10.1-23.5V173.8zm-264.3 42.7c6.3 6.3 9.7 14.1 10.1 23.2V273c-.4 9.2-3.7 16.9-9.8 23.2c-6.2 6.3-14 9.5-23.6 9.5c-9.6 0-17.5-3.2-23.6-9.5c-6.1-6.3-9.4-14-9.8-23.2v-33.3c.4-9.1 3.8-16.9 10.1-23.2c6.3-6.3 13.2-9.6 23.3-10c9.2.4 17 3.7 23.3 10zm191.5 0c6.3 6.3 9.7 14.1 10.1 23.2V273c-.4 9.2-3.7 16.9-9.8 23.2c-6.1 6.3-14 9.5-23.6 9.5c-9.6 0-17.4-3.2-23.6-9.5c-7-6.3-9.4-14-9.7-23.2v-33.3c.3-9.1 3.7-16.9 10-23.2c6.3-6.3 14.1-9.6 23.3-10c9.2.4 17 3.7 23.3 10z"></path>
    </svg>`,
        },
        link: 'https://space.bilibili.com/381628677',
      },
      {
        icon: {
          svg: '<svg t="1663660926462" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2449" width="200" height="200"><path d="M465.189 161.792c-22.967 18.14-44.325 35.109-47.397 37.742l-5.851 4.68 10.971 8.632c5.998 4.827 11.85 9.508 13.02 10.532 1.17 1.024 17.993 14.336 37.156 29.696l34.962 27.795 5.267-3.95c2.925-2.194 23.259-18.432 45.348-35.986 21.943-17.555 41.253-32.768 42.716-33.646 1.609-1.024 2.779-2.194 2.779-2.78 0-0.438-9.655-8.63-21.504-17.846-11.995-9.363-22.674-17.847-23.845-18.871-15.945-13.02-49.737-39.059-50.76-39.059-0.586 0.147-19.896 14.922-42.862 33.061z m233.325 180.37C507.465 493.275 508.928 492.105 505.417 489.911c-3.072-1.902-11.556-8.485-64.073-50.03-9.07-7.168-18.578-14.775-21.358-16.823-2.78-2.194-8.777-6.875-13.312-10.532-4.68-3.657-10.679-8.339-13.312-10.533-13.165-10.24-71.095-56.027-102.107-80.457-5.852-4.681-11.41-8.485-12.142-8.485-0.731 0-10.971 7.754-22.674 17.116-11.703 9.508-22.674 18.286-24.284 19.456-1.755 1.17-5.12 3.95-7.46 6.144-2.34 2.34-4.828 4.096-5.413 4.096-3.072 0-0.731 3.072 6.437 8.777 4.096 3.218 8.777 6.875 10.094 8.046 1.316 1.024 10.24 8.045 19.748 15.506s23.26 18.286 30.428 23.99c19.31 15.215 31.89 25.308 127.853 101.084 47.836 37.742 88.796 69.779 90.844 71.095 3.657 2.487 3.95 2.487 7.46-0.292a1041.42 1041.42 0 0 0 16.092-12.727c6.875-5.413 14.775-11.703 17.554-13.897 30.135-23.699 80.018-63.05 81.774-64.512 1.17-1.024 12.434-9.802 24.868-19.603s37.888-29.696 56.32-44.324c18.579-14.629 46.227-36.425 61.733-48.567 15.506-12.142 27.794-22.528 27.502-23.26-0.878-1.17-57.637-47.104-59.978-48.274-0.731-0.439-18.578 12.727-39.497 29.257z" fill="#8a8a8a" p-id="2450"></path><path d="M57.93 489.326c-15.215 12.288-28.527 23.405-29.697 24.576-2.34 2.194-5.412-0.44 80.018 66.852 33.207 26.185 32.622 25.747 57.637 45.495 10.386 8.192 36.279 28.672 57.783 45.495 38.18 30.135 44.91 35.401 52.663 41.545 2.048 1.756 22.967 18.14 46.372 36.572 23.26 18.432 74.167 58.514 112.933 89.088 38.912 30.573 71.095 55.734 71.826 56.027 0.732 0.293 7.46-4.389 14.921-10.386 21.797-16.97 90.259-70.949 101.523-79.872 5.705-4.535 12.873-10.24 15.945-12.58 3.072-2.488 6.436-5.12 7.314-5.852 0.878-0.878 11.85-9.509 24.283-19.31 20.773-16.091 59.1-46.226 64.366-50.615 1.17-1.024 5.12-4.096 8.777-6.875 3.657-2.78 7.9-6.29 9.509-7.607 1.609-1.317 14.775-11.703 29.257-23.113 29.11-22.82 42.277-33.207 88.503-69.632 17.262-13.605 32.475-25.454 33.646-26.478 2.486-2.048 31.451-24.869 44.617-35.255 4.827-3.657 9.07-7.168 9.508-7.607 0.44-0.585 5.998-4.827 12.435-9.8 6.436-4.828 13.165-10.24 15.067-11.85l3.365-2.926-9.948-7.753c-5.412-4.388-10.24-8.192-10.679-8.63-1.17-1.317-22.381-18.433-30.135-24.284-3.95-3.072-7.314-5.998-7.606-6.73-1.317-3.071-6.73 0.147-29.258 17.994-13.458 10.532-25.746 20.187-27.355 21.504-1.61 1.463-10.533 8.338-19.749 15.652-9.216 7.168-17.115 13.459-17.554 13.898-0.439 0.438-6.583 5.412-13.897 10.971-7.168 5.559-15.214 11.703-17.7 13.75-4.974 4.097-5.413 4.39-20.334 16.239-5.56 4.388-11.264 8.777-12.435 9.8-1.17 1.025-20.333 16.092-42.422 33.354-22.09 17.408-41.546 32.768-43.155 34.084-1.609 1.463-14.482 11.557-28.525 22.528s-40.814 32.037-59.539 46.812c-18.578 14.775-42.276 33.353-52.516 41.399s-23.26 18.285-28.965 22.82l-10.386 8.339-4.389-3.072c-2.34-1.756-4.68-3.511-5.12-3.95-0.439-0.439-4.973-4.096-10.24-8.046-11.849-9.216-14.482-11.264-16.676-13.166-0.878-0.877-4.243-3.51-7.46-5.851-3.22-2.487-6.145-4.681-6.584-5.12-0.439-0.439-6.875-5.705-14.482-11.703-7.607-5.851-14.921-11.556-16.091-12.58-1.317-1.17-17.116-13.605-35.255-27.795-17.993-14.19-35.109-27.648-38.035-29.842-5.705-4.681-33.499-26.624-125.074-98.743-34.523-27.209-72.704-57.344-84.846-66.852-49.737-39.498-55.15-43.594-56.905-43.447-0.877 0-14.043 10.24-29.257 22.528z" fill="#8a8a8a" p-id="2451"></path></svg>'
        },
        link: "https://juejin.cn/user/1420987481469384",
      }
    ],
    footer: {
      message: 'Released under the <a href="https://github.com/vuejs/vitepress/blob/main/LICENSE">MIT License</a>.',
      copyright: 'Copyright © 2022-present <a href="https://github.com/liang14658fox">liang14658fox</a>'
    }
  }
})
